FROM php:5.6-apache

RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak && \
	echo "deb http://mirrors.163.com/debian/ stretch main non-free contrib" >> /etc/apt/sources.list &&\
	echo "deb http://mirrors.163.com/debian/ stretch-updates main non-free contrib" >> /etc/apt/sources.list &&\
	echo "deb http://mirrors.163.com/debian/ stretch-backports main non-free contrib" >> /etc/apt/sources.list &&\
	echo "deb-src http://mirrors.163.com/debian/ stretch main non-free contrib" >> /etc/apt/sources.list &&\
	echo "deb-src http://mirrors.163.com/debian/ stretch-updates main non-free contrib" >> /etc/apt/sources.list &&\
	echo "deb-src http://mirrors.163.com/debian/ stretch-backports main non-free contrib" >> /etc/apt/sources.list &&\
	echo "deb http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib" >> /etc/apt/sources.list &&\
	echo "deb-src http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib" >> /etc/apt/sources.list &&\
	apt-get update && apt-get install -y mlocate \
										 libfreetype6-dev \
										 libjpeg62-turbo-dev \
										 libpng-dev && \
	docker-php-ext-configure gd --with-freetype --with-jpeg && \
	docker-php-ext-install -j$(nproc) gd


# mkdir Dockerfile.php-5.6-apache-xdebug-mlocate-gd && cd Dockerfile.php-5.6-apache-xdebug-mlocate-gd
# docker build -t php-5.6-apache-xdebug-mlocate-gd .
